package com.r2coding.common.exception;

import lombok.Getter;

/**
 * 错误码枚举类
 *
 * @author:98k灬
 * @since:2022/02/22 23:26
 **/
@Getter
public enum BizCode {
    UNKNOW_EXCEPTION(10000, "系统未知异常"),
    VALID_EXCEPTION(10001, "参数格式校验失败"),
    SMS_CODE_EXCEPTION(10002, "验证码获取频率太高，稍后再试"),
    PRODUCT_UP_EXCEPTION(11000, "商品上架异常"),
    USER_EXIST_EXCEPTION(15001, "用户存在"),
    PHONE_EXIST_EXCEPTION(15002, "手机号存在"),
    SERVICE_EXCEPTION(15003, "业务异常"),
    CATEGORY_OCCUPY(15004, "分类被占用"),
    PHONE_CODE_ERROR(15005, "短信验证码校验失败"),
    UPLOAD_ERROR(15006, "文件上传失败"),
    FILE_EMPTY(15007, "文件为空"),
    SINGER_INFO_EMPTY(15008, "上传的文件中歌手信息不存在"),
    ALBUM_SIZE_MAX(15009, "相册容量超出上限"),
    EMAIL_VALID_ERROR(15010, "邮箱校验失败"),
    EMAIL_CODE_ERROR(15011, "邮箱验证码校验失败"),
    NAME_PHONE_REPEAT(15012, "用户名或手机号重复"),
    PHONE_ERROR(15013, "手机号码不合法"),
    USERNAME_ERROR(15014, "用户名不合法"),
    USERNAME_REPEAT(15015, "该用户名已注册"),
    PHONE_REPEAT(15016, "该手机号已注册"),
    USER_NOT_EXIST(15017, "该手机号未注册"),
    THUMHUP_ERROR(15018, "操作频繁，请稍后再试"),
    INVALID_PARAM(15019, "参数不合法"),
    ;

    private final int code;
    private final String msg;

    BizCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
